//
//  NSObject+Extend.m
//  LearnObjectiveC
//
//  Created by 吴可高 on 16/9/8.
//  Copyright © 2016年 吴可高. All rights reserved.
//

#import "NSObject+Extend.h"
#import <objc/runtime.h>

@interface NSObject()
@end

@implementation NSObject (Extend)

-(void)setIdName:(NSString *)idName
{
    objc_setAssociatedObject(self,@selector(setIdName:),idName, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

-(NSString *)idName
{
   return objc_getAssociatedObject(self, @selector(setIdName:));
}
@end
